<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Server</title>
    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">

</head>
<body>
<div class="container">
    <div class="row">
        <div class="col">
            <a href="{{ url_for('.add') }}">Add Server</a>
        </div>
    </div>
<div><a href="{{ url_for('.check_time') }}">检查服务器时间</a></div>
<div>
<form method="GET" >
    <label>Domain:
        <select id="id-domian-query" name="domain" class="">
            <option value="" >请选择</option>
            {% for d in domains %}
            <option value="{{ d }}" >{{ d }}</option>
            {% endfor %}
        </select>
    </label>    
    <button id="queryServer" type="submit" class="">查询</button>
    </form>
</div>
    <div class="row">
        <div class="col">

            <div class="bd-example">
                <table class="table">
                    <thead class="thead-dark">
                    <tr>
                        <th scope="col">ID</th>
                        <th scope="col">IP</th>
                        <th scope="col">username</th>
                        <th scope="col">password</th>
                        <th scope="col">domain</th>
                        <th scope="col">servername</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for s in servers %}

                        <tr>
                         <th scope="col">{{ s.id }} </th>
                            <th scope="col">{{ s.ip }} </th>
                            <td>{{ s.username }}</td>
                            <td>{{ s.password }}</td>
                            <td>{{ s.domain }}</td>
                            <td>{{ s.servername }}</td>
                        </tr>
                    {% endfor %}


                    </tbody>
                </table>
            </div>
        </div>

        <div class="col">

        </div>
    </div>
</div>
<script src="/static/base.js"></script>
<script src="/static/serverindex.js"></script>

</body>
</html>